package com.huike.business.mapper;

import com.huike.business.domain.TbBusiness;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: wwq
 * @Date: 2023/07/12/15:27
 * @Description:
 */
@Mapper
public interface TbBusinessMapper {

    /**
     * 新增商机
     *
     * @param tbBusiness
     */
    void add(TbBusiness tbBusiness);

    /**
     * 查询商机列表
     *
     * @param tbBusiness
     * @return
     */
    List<TbBusiness> list(TbBusiness tbBusiness);

    /**
     * 修改商机
     *
     * @param tbBusiness
     * @return
     */
    int update(TbBusiness tbBusiness);

    /**
     * 通过ids查询商机
     *
     * @param ids
     * @return
     */
    List<TbBusiness> getByIds(@Param("ids") Long[] ids);

    int updateNextTimeAndStatus(@Param("clueId") Long clueId, @Param("status") String status);

    int updateClueEndTimeById(@Param("endTime") Date endTime, @Param("id") Long id);

    List<TbBusiness> pool(TbBusiness tbBusiness);

}
